home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / revtex / prbbib.sty < prev    next >
Text File  |  1992-09-28  |  5KB  |  170 lines

  1. %%% ======================================================================
  2. %%%  @LaTeX-style-file{
  3. %%%     filename        = "prbbib.sty",
  4. %%%     version         = "3.0",
  5. %%%     date            = "September 29, 1992",
  6. %%%     ISO-date        = "1992.09.29",
  7. %%%     time            = "15:41:54.18 EDT",
  8. %%%     author          = "American Physical Society",
  9. %%%     contact         = "Christopher B. Hamlin",
  10. %%%     address         = "APS Publications Liaison Office
  11. %%%                        500 Sunnyside Blvd.
  12. %%%                        Woodbury, NY 11797",
  13. %%%     telephone       = "(516) 576-2390",
  14. %%%     FAX             = "(516) 349-7817",
  15. %%%     email           = "mis@aps.org (Internet)",
  16. %%%     supported       = "yes",
  17. %%%     archived        = "pinet.aip.org/pub/revtex,
  18. %%%                        Niord.SHSU.edu:[FILESERV.REVTEX]",
  19. %%%     keywords        = "REVTeX, version 3.0, PRB-style citations,
  20. %%%                        American Physical Society",
  21. %%%     codetable       = "ISO/ASCII",
  22. %%%     checksum        = "25567 169 396 4772",
  23. %%%     docstring       = "This is the internally called style for
  24. %%%                        PRB-style citations for the American
  25. %%%                        Physical Society under REVTeX 3.0
  26. %%%                        (release of November 10, 1992).
  27. %%%
  28. %%%                        The checksum field above contains a CRC-16
  29. %%%                        checksum as the first value, followed by the
  30. %%%                        equivalent of the standard UNIX wc (word
  31. %%%                        count) utility output of lines, words, and
  32. %%%                        characters.  This is produced by Robert
  33. %%%                        Solovay's checksum utility."
  34. %%% }
  35. %%% ======================================================================
  36. % ****** Start of file prbbib.sty ******
  37. %
  38. %
  39. %   This file is part of the APS files in the REVTeX 3.0 distribution.
  40. %   Version 3.0 of REVTeX, November 10, 1992.
  41. %
  42. %   Copyright (c) 1992 The American Physical Society.
  43. %
  44. %   See the REVTeX 3.0 README file for restrictions and more information.
  45. %
  46.  
  47. \typeout{Filename: prbbib.sty, v3.0 <9/29/1992>}
  48.  
  49. \def\@bibitem#1{\item\if@filesw \immediate\write\@auxout
  50. {\string\bibcite{#1}{\the\value{\@listctr}}}\fi\ignorespaces}
  51.  
  52. \def\@cite#1#2{{#1\if@tempswa , #2\fi}} %
  53. \def\@biblabel#1{$^{#1}$} %
  54.  
  55. \def\@lbibitem[#1]#2{\item[\@biblabel{#1}]\if@filesw
  56. {\def\protect##1{\string ##1\space}\immediate
  57. \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}
  58.  
  59. \newdimen\WidestRefLabelThusFar
  60. \global\WidestRefLabelThusFar\z@
  61.  
  62. \def\bibcite#1#2{\global\@namedef{b@#1}{#2}\@SetMaxRefLabel{#1}}
  63.  
  64. \def\@SetMaxRefLabel#1{%
  65. {%
  66. \setbox0\hbox{$^{\csname b@#1\endcsname}$}%
  67. \ifdim\wd0>\WidestRefLabelThusFar
  68. \global\WidestRefLabelThusFar=\wd0
  69. \fi
  70. }%
  71. }
  72.  
  73. \def\@citex[#1]#2{%
  74. \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  75. \leavevmode\unskip$^{\scriptstyle\@cite{\@collapse{#2}}{#1}}$}
  76.  
  77. \def\CITE{%
  78. \@ifnextchar[{\@tempswatrue\@CITEX}{\@tempswafalse\@CITEX[]}%
  79. }
  80.  
  81. \let\onlinecite\CITE
  82.  
  83. \def\@CITEX[#1]#2{%
  84. \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  85. \leavevmode\unskip\ \@cite{\@collapse{#2}}{#1}}
  86.  
  87. \let\@bylinecite\cite
  88.  
  89. \def\@collapse#1{%
  90. {%
  91. \let\@temp\relax
  92. \@tempcntb\@MM
  93. \def\@citea{}%
  94. \@for \@citeb:=#1\do{%
  95. \@ifundefined{b@\@citeb}%
  96. {\@temp\@citea{\bf ?}%
  97. \@tempcntb\@MM\let\@temp\relax
  98. \@warning{Citation `\@citeb ' on page \thepage\space undefined}%
  99. }%
  100. {\@tempcnta\@tempcntb \advance\@tempcnta\@ne
  101. \edef\MyTemp{\csname b@\@citeb\endcsname}%
  102. \def\@tempa{\@temptokena=\bgroup}%
  103. \if0A{\fi%
  104. \afterassignment\@tempa %
  105. \@tempcntb=0\MyTemp\relax}%
  106. \ifnum\@tempcntb=0\relax%
  107. \@tempcntb=\@MM
  108. \@citea\MyTemp
  109. \let\@temp = \relax
  110. \else %
  111. \edef\@tempd{\number\@tempcntb}%
  112. \ifnum\@tempcnta=\@tempcntb %
  113. \ifx\@temp\relax %
  114. \edef\@temp{\@citea\@tempd}%
  115. \else
  116. \edef\@temp{\hbox{--}\@tempd}%
  117. \fi
  118. \else %
  119. \@temp\@citea\@tempd
  120. \let\@temp\relax
  121. \fi
  122. \fi
  123. }%
  124. \def\@citea{, }%
  125. }%
  126. \@temp %
  127. }%
  128. }%
  129.  
  130. \def\references{%
  131. \ifpreprintsty
  132. \newpage
  133. \hbox to\hsize{\hss\large \refname\hss}%
  134. \else
  135. \vskip24pt
  136. \hrule width\hsize\relax
  137. \vskip 1.6cm
  138. \fi
  139. \list{\@biblabel{\arabic{enumiv}}}%
  140. {\labelwidth\WidestRefLabelThusFar  \labelsep2pt %
  141. \leftmargin\labelwidth %
  142. \advance\leftmargin\labelsep %
  143. \ifdim\baselinestretch pt>1 pt %
  144. \parsep  4pt\relax %
  145. \else   %
  146. \parsep  0pt\relax %
  147. \fi
  148. \itemsep\parsep %
  149. \usecounter{enumiv}%
  150. \let\p@enumiv\@empty
  151. \def\theenumiv{\arabic{enumiv}}%
  152. }%
  153. \let\newblock\relax %
  154. \sloppy\clubpenalty4000\widowpenalty4000
  155. \sfcode`\.=1000\relax
  156. \ifpreprintsty\else\small\fi
  157. }
  158.  
  159. \def\endreferences{%
  160. \def\@noitemerr{\@warning{Empty `thebibliography' environment}}%
  161. \endlist     \let\@SetMaxRefLabel\@gobble
  162. }
  163.  
  164. \def\thebibliography#1{\references}
  165.  
  166. \def\endthebibliography{\endreferences}
  167.  
  168. %
  169. % ****** End of file prbbib.sty ******
  170.